package com.atguigu.atcrowdfunding.controller;

import com.atguigu.atcrowdfunding.bean.TAdmin;
import com.atguigu.atcrowdfunding.mapper.TAdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class DispatcherController {
    @Autowired
    TAdminMapper adminMapper;
    @RequestMapping(value = "/")
    public String index(){
        List<TAdmin> tAdmins = adminMapper.selectByExample(null);
        System.out.println("tAdmins = " + tAdmins);
        return "admins/login";//视图解析器解析返回视图名称
    }
    @RequestMapping("/login.html")
    public String loginPage(){
        return "admins/login";
    }

}
